<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
</head>
<body>
    <div>

        <input type="button" id ="button1" value="1" onclick="moveBtn(this);">
    
        <input type="button" id ="button2" value="2" />
    
    </div>
    
    <script type="text/javascript">
    
        function moveBtn(obj) {
                console.log(obj)
                  var clone = obj.cloneNode(true);
    
                  var parent = obj.parentNode;
    
                  parent.appendChild(clone);
    
                  parent.removeChild(obj);
    
        }
    
    </script>
</html>
</body>

    
    <style>
        #obj{
            width: 0;height: 0;border-top:20px solid red;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid transparent
        }
       
    </style>
</body>
</html>